package com.his.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.his.dao.jpa.MxjOperationDetailDAO;
import com.his.vo.DetailVO;

@Service
@Transactional
public class MxjDetailVOService {

	@Autowired
	public MxjOperationDetailDAO operationDetailDAO;
	
	public Map<String, Object> searchopDetail(int page, int rows){
		PageRequest pr=new PageRequest(page-1, rows);
		List<DetailVO>list=operationDetailDAO.findByPage(pr);
		long total=operationDetailDAO.count();
		Map<String, Object>map=new HashMap<>();
		map.put("total", total);
		map.put("rows", list);
		return map;
	}
}
